<%--
  Created by IntelliJ IDEA.
  User: Tang'ya'kang
  Date: 2023/5/23
  Time: 23:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Root Orders</title>
</head>
<%@ include file="/manage/head.jsp"%>
<body>
<div class="card">
    <div class="card-body">
        <h5 class="card-title" align="center">所有订单</h5>
        <div class="card-body">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th scope="col">用户编号</th>
                    <th scope="col">订单编号</th>
                    <th scope="col">日期</th>
                    <th scope="col">金额</th>
                    <th scope="col">状态</th>
                    <th scope="col">详情</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${requestScope.Orders}" var="order" varStatus="status">
                    <tr>
                        <th scope="row">${order.user_id}</th>
                        <th scope="row">${order.order_id}</th>
                        <td class="book.name">${order.create_time}</td>
                        <td>${order.price}</td>
                        <c:if test="${order.status eq 0}"><td>未签收</td></c:if>
                        <c:if test="${order.status eq 2}"><td>已签收</td></c:if>
                        <td><a href="./orderItemsServlet?action=SelectItemsByOrder_id&order_id=${order.order_id}" class="badge badge-primary delete">详情</a></td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
        <%@ include file="/html/AccountPage_Nav.jsp"%>

    </div>
    <%@ include file="/html/Foot.jsp"%>
</div>

</body>
</html>
